package com.three.pinmore.pin.view.fragment;

import android.graphics.Color;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.three.pinmore.R;
import com.three.pinmore.base.BaseFragment;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;

/**
 * Created by YWT love meng on 2017/8/30
 */
public class HomeFragment extends BaseFragment {

    @BindView(R.id.include_fragment_text)
    TextView includeFragmentText;
    @BindView(R.id.include_fragment_title)
    RelativeLayout includeFragmentTitle;
    Unbinder unbinder;
    @BindView(R.id.include_fragment_image)
    ImageView includeFragmentImage;

    public HomeFragment() {
    }

    public static HomeFragment newInstance() {
        HomeFragment fragment = new HomeFragment();
        return fragment;
    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_home;
    }

    @Override
    protected void initView() {

        includeFragmentText.setText("拼多多");
        includeFragmentText.setTextColor(Color.WHITE);
        includeFragmentImage.setVisibility(View.GONE);
        includeFragmentTitle.setBackgroundResource(R.color.red);
    }

    @Override
    public void onClick(View view) {

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // TODO: inflate a fragment view
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        unbinder = ButterKnife.bind(this, rootView);
        return rootView;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }
}
